package com.veepeak.server.service;

import com.veepeak.server.common.BaseRepository;
import com.veepeak.server.common.BaseService;
import com.veepeak.server.domain.DtcCommand;
import com.veepeak.server.domain.ModelCommand;
import com.veepeak.server.repository.DtcCommandRepository;
import com.veepeak.server.repository.ModelCommandRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
public class ModelCommandService extends BaseService<ModelCommand,String> {
    @Autowired
    private ModelCommandRepository modelCommandRepository;

    @Override
    public BaseRepository<ModelCommand, String> getRepo() {
        return this.modelCommandRepository;
    }

    public ModelCommand getByCompId(String compId){
        return modelCommandRepository.getFirstByCompId(compId);
    }

    public ModelCommand getByCompIdAndTestId(String mid, String testId){
        return modelCommandRepository.getByCompIdAndTestId(mid,testId);
    }

}
